/*
 * File:   TUMessage.cpp
 * Author: msautte
 *
 * Created on April 24, 2011
 */

#include "TigerUpdate.h"
#include <cstdio>
#include <cstring>

TUMessage::TUMessage(int type, int code, const char* text) : TUObject(NULL) {
    myType = type;
    myCode = code;
    myText = text;
    myTextLength = strlen(myText);
    myObjectType = TUMESSAGE;
}

bool TUMessage::operator ==(TUObject* other){
    return ((TUObject *)this == other &&
            myType == ((TUMessage *)other)->getType() &&
            myCode == ((TUMessage *)other)->getCode());

}

bool TUMessage::operator !=(TUObject* other){
    return !(this == other);
}

int TUMessage::getCode(){
    return myCode;
}

const char* TUMessage::getText(){
    return myText;
}

int TUMessage::getType(){
    return myType;
}


